package com.wpp.lagouservicecode.controller;

import com.wpp.core.result.ResultDTO;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wpp25
 * @date 2021/5/21 22:04
 * @description：
 */
@RestController
@RequestMapping("/api/config")
@RefreshScope
public class ConfigController {

    @Value("${test.hello}")
    private String hello;

    @Value("${server.wpp}")
    private String wpp;

    @RequestMapping("/get")
    public ResultDTO<String> getConfig(){
        return new ResultDTO<>(true,wpp,hello);
    }
}
